﻿namespace Borg
{
    public class PlugTypePropertyInfo
    {
        private readonly PlugTypeInfo _plugType;

        public bool AutoRegister
        {
            get { return _plugType.plugAttribute.AutoRegister; }
            set
            {
                if (AutoRegister == value)
                    return;

                _plugType.plugAttribute.AutoRegister = value;
                _plugType.OnPropertyChanged("AutoRegister");
            }
        }

        public bool AutoPlug
        {
            get { return _plugType.plugAttribute.AutoPlug; }
            set
            {
                if (AutoPlug == value)
                    return;

                _plugType.plugAttribute.AutoPlug = value;
                _plugType.OnPropertyChanged("AutoPlug");
            }
        }

        public PlugTypePropertyInfo(PlugTypeInfo plugType)
        {
            _plugType = plugType;
        }
    }
}

